package lzupdater.net;

import lzupdater.utils.Text;

//LZRosterUpdater, a java client to update LZRoster
//Copyright (C) 2008 Fraskor from Krasus (e-mail: fraskor@gmail.com)
//
//This file is part of LZRosterUpdater.
//
//LZRosterUpdater is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

/**
 * 
 * @author Fraskor
 */
public class HTTPData {

	public enum Status {
		OK(true), FAILED(false);

		private boolean ok;

		Status(boolean ok) {
			this.ok = ok;
		}

		public boolean isOk() {
			return ok;
		}
	}

	private String address;
	private Status status;
	private Exception exception;

	private Cookies cookies = null;
	private Text source = null;
	private HTTPHeader header = null;
	private int responseCode;

	public Cookies getCookies() {
		return cookies;
	}

	public void setCookies(Cookies cookies) {
		this.cookies = cookies;
	}

	public Text getSource() {
		return source;
	}

	public void setSource(Text source) {
		this.source = source;
	}

	public HTTPHeader getHeader() {
		return header;
	}

	public void setHeader(HTTPHeader header) {
		this.header = header;
	}

	public int getResponseCode() {
		return responseCode;
	}

	public void setResponseCode(int responseCode) {
		this.responseCode = responseCode;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public Exception getException() {
		return exception;
	}

	public void setException(Exception exception) {
		this.exception = exception;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

}
